package cn.tinlan.shopcoin.app.car.model;

import com.chad.library.adapter.base.entity.SectionEntity;

import cn.tinlan.shopcoin.app.discover.model.DiscoverItemDataModel;

/**
 * Created by Mortimer on 2018/11/24. 16:26
 * 佛祖🙏，永无bug。
 */
public class ShopCarItemModel extends SectionEntity<ShopCarItemModel.ShopCarItemBean> {

    public String shopid;
    public boolean isShopSelect;

    public ShopCarItemBean itemModel;

    public String getShopid() {
        return shopid;
    }

    public void setShopid(String shopid) {
        this.shopid = shopid;
    }

    public boolean isShopSelect() {
        return isShopSelect;
    }

    public void setShopSelect(boolean shopSelect) {
        isShopSelect = shopSelect;
    }

    public ShopCarItemModel.ShopCarItemBean getItemModel() {
        return itemModel;
    }

    public ShopCarItemModel(boolean isHeader, String header, String shopid) {
        super(isHeader, header);
        this.shopid = shopid;
    }

    public ShopCarItemModel(ShopCarItemModel.ShopCarItemBean bean) {
        super(bean);
        this.itemModel = bean;
    }

    public static class ShopCarItemBean {
        private String id;
        private String goodid;
        private String shopid;
        private String buy_num;



        private String name;
        private String price;
        private String thumb;
        private String type;
        private boolean islastgood = false;
        private boolean isSelected = false;



        public ShopCarItemBean(ShoppingCarItemModel model, String type, boolean islastgood) {
            this.id = model.getId();
            this.goodid = model.getGoods_id();
            this.shopid = model.getShop_id();
            this.name = model.getName();
            this.price = model.getPrice();
            this.thumb = model.getThumb();
            this.type = type;
            this.buy_num = model.getBuy_num();
            this.islastgood = islastgood;
        }
        public ShopCarItemBean(String id, String goodid, String name, String price, String thumb, String type, boolean islastgood) {
            this.id = id;
            this.goodid = goodid;
            this.name = name;
            this.price = price;
            this.thumb = thumb;
            this.type = type;
            this.islastgood = islastgood;
        }

        public boolean isIslastgood() {
            return islastgood;
        }

        public void setIslastgood(boolean islastgood) {
            this.islastgood = islastgood;
        }

        public String getGoodid() {
            return goodid;
        }

        public void setGoodid(String goodid) {
            this.goodid = goodid;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getPrice() {
            return price;
        }

        public void setPrice(String price) {
            this.price = price;
        }


        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }
        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getThumb() {
            return thumb;
        }

        public void setThumb(String thumb) {
            this.thumb = thumb;
        }
        public String getShopid() {
            return shopid;
        }

        public void setShopid(String shopid) {
            this.shopid = shopid;
        }

        public boolean isSelected() {
            return isSelected;
        }

        public void setSelected(boolean selected) {
            isSelected = selected;
        }

        public String getBuy_num() {
            return buy_num;
        }

        public void setBuy_num(String buy_num) {
            this.buy_num = buy_num;
        }
    }
}
